package com.lms.dao.user;

import com.lms.bean.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    /*根据Code获得登录用户*/
    public User getLoginUser(Connection connection,String userCode);
    /*修改用户密码*/
    public int updatePwd(Connection connection,String id,String pwd)throws SQLException;
    /*获取用户总数*/
    public int getUserCount(Connection connection,String userName,int userRole)throws Exception;
    /*获取用户列表*/
    List<User> getUserList(Connection connection)throws Exception;
    /*添加用户*/
    public boolean addUser(Connection connection, User newUser)throws Exception;
    /*根据id修改用户*/
    public int modifyById(Connection connection,User user) throws SQLException;
    /*获取当前管理员联系方式*/
    public String getRootMsg(Connection connection) throws SQLException;
}
